package com.tensquare.search.model;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;

import java.io.Serializable;

@Data
@Document(indexName = "ten_es",type = "article")
public class Article implements Serializable {

    @Id
    private String id ; // 索引 , 分词 , 存储

    @Field(index = true , analyzer = "ik_max_word" , searchAnalyzer = "ik_max_word")
    private String title ;

    @Field(index = true , analyzer = "ik_max_word" , searchAnalyzer = "ik_max_word")
    private String content ;

    @Field(index = true , analyzer = "ik_max_word" , searchAnalyzer = "ik_max_word")
    private String state ;

}
